home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / scvs / doc / RCS / cheat.me,v < prev   
Encoding:
Text File  |  1991-11-05  |  12.7 KB  |  422 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @\" @;
  7.  
  8.  
  9. 1.2
  10. date     91.11.04.22.32.45;  author jhh;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     91.11.01.14.51.01;  author jhh;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @@
  22.  
  23.  
  24. 1.2
  25. log
  26. @brought up-to-date for the official scvs release
  27. @
  28. text
  29. @'\"  This is a cheat sheet for using SCVS.
  30. .fo ''%''
  31. .lp
  32. .sz +4
  33. .ce
  34. \fBSCVS Cheat Sheet\fP
  35. .sz -4
  36. .sp
  37. .ce
  38. November 3, 1991
  39. .sp
  40. .pp
  41. The SCVS Cheat Sheet explains some of the standard uses of \fBscvs\fP.
  42. If you want to do something that is not covered here you should 
  43. refer to the
  44. man pages for \fBscvs\fP, \fBcvs\fP, and \fBrcs\fP.
  45. \fBScvs\fP manages source directory trees called \fImodules\fP.
  46. \fBScvs\fP modules for the kernel correspond to what we've traditionally
  47. called modules, e.g. net, timer, mach, etc.
  48. The "master" copy of the modules is stored in the \fIrepository\fP,
  49. which is a directory tree of RCS files rooted at 
  50. \fC/sprite/src/kernel/Cvsroot\fP.
  51. In order to modify the source for a module you must first get your
  52. own copy of the module.
  53. Make your changes in your copy, and when you are satisfied with them
  54. commit your changes to the repository.
  55. Your changes are not applied to the repository until you commit them,
  56. at which time they become the "latest" version of the sources.
  57. Throughout this cheat sheet the term "latest version" refers to 
  58. the current
  59. version of the sources in the repository.
  60. .(b
  61. .ip "\fBHow do I get a copy of a module?\fP"
  62. .sp
  63. Copies of kernel modules are usually kept in your kernel build directory
  64. (\fC/sprite/src/kernel/\fP\fIusername\fP). 
  65. In this directory type \fBscvs co\fP \fImodule\fP.
  66. A subdirectory called \fImodule\fP will be created,
  67. and it will be populated
  68. with the current version of the module.  
  69. You will be told about other users that have a copy of the module
  70. checked out, including any other copies you might have.
  71. You may want to check with these people to make sure that your changes
  72. will be compatible.
  73. If you don't intend to commit your changes to the repository
  74. then you should use the \fB\-i\fP option so that other
  75. users are not told about your copy.
  76. .sp
  77. After the checkout is complete you need to run \fBmkmf\fP in your copy
  78. to create a Makefile, dependencies.mk, etc.
  79. .sp
  80. It is ok to re-checkout a module if you
  81. checked it out before and still have the source tree.
  82. .)b
  83.  
  84. .(b
  85. .ip "\fBHow do I get information about the status of my copy of a module?\fP"
  86. .sp
  87. Once you have a copy of a module you may want some information about
  88. the files in your copy, 
  89. like which ones you've modified and
  90. which ones are out-of-date with the latest version. 
  91. \fBscvs info\fP will tell you what
  92. you want to know.  Here's what its output means:
  93. .(l
  94. \fBU\fP \fIfile\fP    Your copy of \fIfile\fP needs to be updated.
  95. \fBM\fP \fIfile\fP    You've modified \fIfile\fP.
  96. \fBC\fP \fIfile\fP    You've modified \fIfile\fP, and it is also out-of-date.
  97. \fBA\fP \fIfile\fP    You've added \fIfile\fP.
  98. \fBR\fP \fIfile\fP    You've removed \fIfile\fP.
  99. \fBD\fP \fIfile\fP    Somebody deleted \fIfile\fP from the repository.
  100. .)l
  101. .)b
  102.  
  103. .(b
  104. .ip "\fBWhat if I want more information about my copy of a file?\fP"
  105. .sp
  106. The command \fBscvs status\fP \fIfile\fP 
  107. will give you RCS information about the your copy of a file and
  108. the latest version of the file.
  109. Here is
  110. some sample output for the file \fItimerInt.h\fP.
  111. .(l
  112. File:    timerInt.h
  113. From:    9.8    Fri Sep 13 15:04:52 1991 timerInt.h
  114. RCS:    9.9    /sprite/src/kernel/Cvsroot/kernel/timer/timerInt.h,v
  115. .)l
  116. .ip
  117. The \fIFrom:\fP line tells you that your copy of \fItimerInt.h\fP 
  118. came from RCS version 9.8 of that file, and that you created the
  119. copy on Friday, September 13, 1991 at 15:04:52.  The \fIRCS:\fP
  120. line tells you that the latest RCS version of the file is 9.9,
  121. and it gives you the full path to the RCS file, not that you would
  122. ever need it.
  123. .)b
  124.  
  125. .(b
  126. .ip "\fBHow do I get the RCS log for my copy of a file?\fP"
  127. .sp
  128. \fBScvs log\fP \fIfile\fP will print out the RCS log for the file.
  129. .)b
  130.  
  131. .(b
  132. .ip "\fBHow do I run diff on my copy of a file?\fP"
  133. .sp
  134. \fBScvs diff\fP \fIfile\fP will do a \fBrcsdiff\fP between your
  135. copy of a file and the version from which it came.  If you want
  136. to do a diff between your version and the latest version you
  137. should do \fBscvs diff \-R\fP \fIfile\fP.
  138. You can also do diffs between various versions of the file by specifying
  139. the standard \fB\-r\fP options.
  140. .)b
  141.  
  142. .(b
  143. .ip "\fBHow do I bring my copy up-to-date with the latest version?\fP"
  144. .sp
  145. If your copy of the sources is out-of-date 
  146. with the latest version in the repository
  147. you can update it using
  148. \fBscvs update\fP [\fImodules|subdirs|files\fP].  
  149. If you don't specify any files it will update all
  150. files in the current directory and its subdirectories, otherwise it will
  151. only update the files or subdirectories
  152. you listed.  If \fBscvs update\fP discovers that
  153. you have modified a file, and the copy of the file in the repository 
  154. has changed also, it will use \fBrcsmerge\fP to try and merge the changes.
  155. If this happens you will want to look at the file to make sure the
  156. changes were compatible.  The output from \fBscvs update\fP is similar to
  157. that of \fBscvs info\fP:
  158. .(l
  159. \fBU\fP \fIfile\fP    Your copy of \fIfile\fP was updated.
  160. \fBM\fP \fIfile\fP    Your changes to \fIfile\fP were merged with the new version.
  161. \fBC\fP \fIfile\fP    Your changes to \fIfile\fP were merged, but there was a conflict.
  162. \fBA\fP \fIfile\fP    You've added \fIfile\fP.
  163. \fBR\fP \fIfile\fP    You've removed \fIfile\fP.
  164. \fBD\fP \fIfile\fP    \fIfile\fP was deleted from your sources.
  165. .)l
  166. .ip
  167. An "update" target has been added to the Makefile for kernel modules
  168. so that \fBpmake update\fP will run \fBscvs update\fP.
  169. This is useful for updating all modules in \fC/sprite/src/kernel\fP.
  170. .)b
  171.  
  172. .(b
  173. .ip "\fBWho else has a copy of the same module?\fP"
  174. .sp
  175. When you check out a module you will be told about other users who
  176. also have a copy.
  177. You can also find out by doing \fBscvs who\fP [\fImodules\fP].
  178. .)b
  179.  
  180. .(b
  181. .ip "\fBWhat if I just want to look at the sources for a module?\fP"
  182. .sp
  183. Copies of all kernel modules are kept in \fC/sprite/src/kernel\fP.
  184. These copies are read-only so don't try to modify them. 
  185. These copies can be used for browsing, as well as for building the
  186. object files that are used to produce official kernels.
  187. .)b
  188.  
  189. .(b
  190. .ip "\fBHow do I add a new file to a module?\fP"
  191. .sp
  192. \fBScvs\fP only deals with files it knows about.  
  193. If \fBscvs\fP hasn't been told about a file it will 
  194. be ignored by any \fBscvs\fP commands.
  195. To add a file to a module create the file in your copy of the module,
  196. then type
  197. \fBscvs add\fP \fIfile\fP.  
  198. The file must exist in order to be added.
  199. The file will not be added to the repository until you \fBcommit\fP your
  200. changes.  
  201. .)b
  202.  
  203. .(b
  204. .ip "\fBHow do I add a new subdirectory to a module?\fP"
  205. .sp
  206. Subdirectories are added using \fBscvs add\fP 
  207. in your copy of a module
  208. just like files, except
  209. that you will be asked if you really want to do this.  If the subdirectory
  210. contains any files they must be added individually (\fBadd\fP is not recursive).
  211. .)b
  212.  
  213. .(b
  214. .ip "\fBHow do I remove a file from a module?\fP"
  215. .sp
  216. In your copy of a module type
  217. \fBscvs remove\fP \fIfile\fP to remove a file.
  218. If the file still exists it will be deleted.
  219. The file will not be removed from the repository until you \fBcommit\fP your
  220. changes.
  221. .)b
  222.  
  223. .(b
  224. .ip "\fBOops. I just accidently removed a file from my copy!\fP"
  225. .sp
  226. If you haven't \fBcommit\fPted your changes yet, you can retrieve 
  227. the file using \fBscvs add\fP \fIfile\fP.
  228. It will give you the version of the file you originally checked out.
  229. .)b
  230.  
  231. .(b
  232. .ip "\fBHow do I add a new module to the repository?\fP"
  233. .sp
  234. Don't try this at home.  Send mail to jhh@@sprite.
  235. .)b
  236.  
  237. .(b
  238. .ip "\fBHow do I undo my changes to a file?\fP"
  239. .sp
  240. Currently the best way to do this is to use
  241. \fBscvs remove\fP \fIfile\fP, followed by \fBscvs add\fP \fIfile\fP. 
  242. This will give you the version of the file you originally checked out.
  243. .)b
  244.  
  245. .(b
  246. .ip "\fBHow do I commit my changes to a module?\fP"
  247. .sp
  248. After you have made your changes to a module 
  249. you need to commit them into the repository.
  250. There are several steps in committing your changes:
  251. .np
  252. Verify that your copy is up-to-date and it works properly.
  253. .np
  254. Lock the module(s) using \fBscvs lock\fP [\fImodules\fP].
  255. Locking the modules prevents other users from committing changes
  256. at the same time.
  257. .np
  258. Use \fBscvs commit\fP [\fIfiles\fP] (\fBcommit\fP is usually
  259. abbreviated
  260. as \fBci\fP) to commit your changes.  
  261. Each \fBscvs ci\fP command allows you to specify one log message
  262. (either using \fB\-m\fP or by bringing up an editor).  
  263. If you want all the files you modified
  264. to have the same message use \fBscvs ci\fP
  265. without any options,
  266. otherwise you must run \fBscvs ci\fP once for each message and
  267. corresponding list of files.
  268. .np
  269. As you commit your changes the copy of the sources
  270. in \fC/sprite/src/kernel/\fP\fImodule\fP
  271. will be updated.
  272. These copies are used to build kernels, so you need to recompile any
  273. source files you may have changed.
  274. To do this cd to \fC/sprite/src/kernel/\fP\fImodule\fP.
  275. Run \fBmkmf\fP, followed by \fBpmake\fP.
  276. Make sure the resulting object files produce a working kernel.
  277. Then run \fBpmake install\fP.
  278. Be sure to compile and install for all machine types.
  279. If the sources don't build a working kernel then you
  280. may have forgotten to \fBadd\fP 
  281. or \fBremove\fP a file.
  282. .np
  283. Unlock the modules using \fBscvs unlock\fP [\fImodules\fP].
  284. Don't forget to do this.
  285. .)b
  286.  
  287. .(b
  288. .ip "\fBWhat do I do when I'm done with my copy?\fP"
  289. .sp
  290. \fBscvs done\fP
  291. lets \fBscvs\fP know that you are done with your copy,
  292. so that other users will no longer be told about it.
  293. The \fB\-d\fP option will delete your copy.
  294. Use the \fB\-d\fP option with care.
  295. If you deleted your copy using \fBrm\fP without running \fBscvs done\fP
  296. first then \fBscvs\fP will think you still have a copy.
  297. You set it straight with \fBscvs done\fP \fIpathname\fP,
  298. where \fIpathname\fP is the full pathname of the copy you used to have.
  299. .)b
  300.  
  301. .(b
  302. .ip "\fBHow do I unlock a locked module?\fP"
  303. .sp
  304. If \fBsvcs\fP is killed unexpectedly it will leave 
  305. locks on any modules
  306. it was processing at the time.
  307. If you have an unwanted lock on a module you can remove it with
  308. \fBscvs unlock\fP [\fImodules\fP].
  309. If you want to remove all locks on a module, even those owned by other
  310. people, you can do so with \fBscvs unlock -a\fP [\fImodules\fP].
  311. .)b
  312. @
  313.  
  314.  
  315. 1.1
  316. log
  317. @Initial revision
  318. @
  319. text
  320. @d4 1
  321. d7 1
  322. d9 3
  323. d17 15
  324. a31 1
  325.  
  326. d35 2
  327. a36 3
  328. Copies of kernel modules, such as net, timer, etc,
  329. are usually kept in 
  330. /sprite/src/kernel/\fIusername\fP. 
  331. d38 3
  332. a40 2
  333. A subdirectory called \fImodule\fP will be created and it will be populated
  334. with the sources for the module.  
  335. d45 2
  336. a46 2
  337. If you don't intend to merge your changes back into the standard
  338. source tree then you should use the \fB\-i\fP option so that other
  339. d49 3
  340. d57 1
  341. a57 1
  342. .ip "\fBHow do I get information about the status of my copy?\fP"
  343. d62 1
  344. a62 1
  345. which ones are out-of-date. 
  346. d79 3
  347. a81 2
  348. will give you information about the RCS version
  349. of the current sources and the RCS version of your file.  Here is
  350. d92 1
  351. a92 1
  352. line tells you that the current RCS version of the file is 9.9,
  353. d98 1
  354. a98 1
  355. .ip "\fBHow do I get the RCS log for a file?\fP"
  356. d104 1
  357. a104 1
  358. .ip "\fBHow do I diff my copy of a file?\fP"
  359. d108 1
  360. a108 1
  361. to do a diff between your version and the most recent version you
  362. d115 1
  363. a115 1
  364. .ip "\fBHow do I bring my copy up-to-date with the current sources?\fP"
  365. d117 5
  366. a121 2
  367. If your copy of the sources is out-of-date you can update it using
  368. \fBscvs update\fP.  If you don't specify any files it will update all
  369. d123 2
  370. a124 1
  371. only update the files you listed.  If \fBscvs update\fP discovers that
  372. d138 4
  373. d145 1
  374. a145 1
  375. .ip "\fBWho else has a copy?\fP"
  376. d153 9
  377. d167 4
  378. a170 2
  379. You can add a file to a module by using
  380. \fBscvs add\fP \fIfile\fP.  The file must exist in order to be added.
  381. d178 3
  382. a180 1
  383. Subdirectories are added using \fBscvs add\fP just like files, except
  384. d188 5
  385. a192 2
  386. Use \fBscvs remove\fP \fIfile\fP to remove a file from the module.
  387. If the file still exists it will be renamed \fIfile.old\fP.
  388. d196 1
  389. a196 1
  390. .ip "\fBOops. I just accidently removed a file!\fP"
  391. a200 2
  392. Also, if the file existed when you removed it you can find it in
  393. \fIfile.old\fP.
  394. d212 1
  395. a212 1
  396. Currently the best way to do this is to delete the file, then do
  397. d218 1
  398. a218 1
  399. .ip "\fBHow do I commit my changes?\fP"
  400. d220 3
  401. a222 3
  402. When you have made your changes to a module and verified that they work
  403. you need to merge your changes into the source tree so that other
  404. users see them.  There are several steps in committing your changes:
  405. d227 1
  406. a227 1
  407. Locking the modules prevents other users from checking in changes
  408. d241 2
  409. a242 2
  410. As you commit your changes the installed version of the sources
  411. in /sprite/src/kernel/\fImodule\fP
  412. d244 9
  413. a252 3
  414. Once all your files are committed you should cd to the installed
  415. sources and make sure they compile and produce a working kernel.
  416. If they don't then you may have forgotten to \fBadd\fP 
  417. d267 4
  418. d272 12
  419. a283 1
  420.  
  421. @
  422.